/**
 * AI图像生成提供商抽象接口
 */
export interface ImageGenerationRequest {
  prompt: string;
  originalImageUrl?: string;
  size?: string;
  quality?: string;
  style?: string;
  n?: number;
}

export interface ImageGenerationResponse {
  imageUrl: string;
  requestId?: string;
  metadata?: Record<string, any>;
}

export interface AIProviderConfig {
  apiKey: string;
  baseURL?: string;
  timeout?: number;
  maxRetries?: number;
  [key: string]: any;
}

export abstract class AIProvider {
  protected config: AIProviderConfig;
  
  constructor(config: AIProviderConfig) {
    this.config = config;
  }

  /**
   * 检查提供商是否可用
   */
  abstract isAvailable(): boolean;

  /**
   * 生成图像
   */
  abstract generateImage(request: ImageGenerationRequest): Promise<ImageGenerationResponse>;

  /**
   * 获取提供商名称
   */
  abstract getProviderName(): string;

  /**
   * 验证配置
   */
  protected abstract validateConfig(): void;
}